package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2016/9/19.
 */
public class GuideReplyGetLikesAction extends AHttpService<PbBean.PbResGuideLikeList> {

    private int answerId;
    private int offset;

    private GuideReplyGetLikesAction(Context context, int answerId, int offset) {
        super(context);
        this.answerId = answerId;
        this.offset = offset;
    }

    public static GuideReplyGetLikesAction newInstance(Context context, int answerId, int offset) {
        return new GuideReplyGetLikesAction(context, answerId, offset);
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqGuideLikeList.Builder builder = PbBean.PbReqGuideLikeList.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setId(answerId);
        builder.setOffset(offset);
        return apiService.guideLikeList(builder.build());
    }
}
